From: Drew Parsons Date: Tue, 13 Oct 2026 10:08:50 +0000 (+0200) Subject: Check for null pointer in vtkMatplotlibMathTextUtilities X-Git-Tag: archive/raspbian/9.6.2+ds-3+rpi1^2~15 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8772053d90e8f4580795f9d07a67f5fdaca63211;p=vtk9.git Check for null pointer in vtkMatplotlibMathTextUtilities Forwarded: not-needed Check if image scalar pointer is null before accessing to avoid crash on s390x. Gbp-Pq: Name matplotlib_nullptr_s390x.patch --- diff --git a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx index 3e6b219f0..714723e5d 100644 --- a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx +++ b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx @@ -1023,6 +1023,12 @@ bool vtkMatplotlibMathTextUtilities::RenderOneCell(vtkImageData* image, int bbox return false; } + if (ptr == nullptr) + { + vtkErrorMacro("image returned null ScalarPointer."); + return false; + } + // Background, do not load python data if (row > pythonRowStart || col < pythonColStart || row <= pythonRowEnd || col >= pythonColEnd)